Alex Crichton [Tue, 19 Aug 2014 04:54:12 +0000 (21:54 -0700)]
More import renaming fallout
bors [Tue, 19 Aug 2014 00:14:11 +0000 (00:14 +0000)]
auto merge of #399 : lucidd/cargo/master, r=alexcrichton
Kevin Walter [Mon, 18 Aug 2014 23:54:41 +0000 (01:54 +0200)]
Change all uses of `use foo = bar` to `use bar as foo`
bors [Mon, 18 Aug 2014 16:14:13 +0000 (16:14 +0000)]
auto merge of #394 : colindean/cargo/fix-readme, r=alexcrichton
When a $ is present, it prevents someone from easily copying and pasting the whole block.
bors [Mon, 18 Aug 2014 04:44:14 +0000 (04:44 +0000)]
auto merge of #395 : bkoropoff/cargo/import-shadow, r=alexcrichton
- Update toml-rs to version without import shadowing errors
- Fix some import shadowing errors in the tests
Brian Koropoff [Mon, 18 Aug 2014 01:34:50 +0000 (18:34 -0700)]
Fix import shadowing errors in tests
Brian Koropoff [Mon, 18 Aug 2014 01:33:51 +0000 (18:33 -0700)]
Upgrade to latest toml-rs
This version has a fix for an import shadowing error
Colin Dean [Sun, 17 Aug 2014 22:58:07 +0000 (18:58 -0400)]
Remove $ from lines in readme to improve copyability
When a $ is present, it prevents someone from easily copying and
pasting the whole block.
bors [Sun, 17 Aug 2014 05:19:23 +0000 (05:19 +0000)]
auto merge of #388 : alexcrichton/cargo/fix-cross-builds, r=burningtree
0c834d7b accidentally broke this by favoring rustc's target triple over the
actual target triple.
Alex Crichton [Sun, 17 Aug 2014 05:10:36 +0000 (22:10 -0700)]
If --target is specified, pass that to build commands
0c834d7b accidentally broke this by favoring rustc's target triple over the
actual target triple.
bors [Sat, 16 Aug 2014 23:18:45 +0000 (23:18 +0000)]
auto merge of #367 : alexcrichton/cargo/git2-rs, r=wycats
In general relying on external programs is dicey and tricky as they're very
different across systems in both how they're used as well as what versions
you'll find. Instead of binding to the least common denominator of CLI, we can
code against an exact version of libgit2.
This introduces a build-time dependency on cmake which libgit2 requires to build
itself, which is unfortunate, but thankfully it's only a build time dep. The
build process for libgit2 also automatically detects as many system libraries as
possible to use (if available), falling back to bundled versions if not
available. I have currently not figured how to control this, so the link-config
package is used to build libgit2 which requires that pkg-config be installed to
build cargo as well.
Closes #138
Alex Crichton [Sat, 16 Aug 2014 22:00:38 +0000 (15:00 -0700)]
Run cargo off the main thread.
On windows the main thread suffers the same fate as rustdoc (as linked in the
comments), and hence needs to run off the main thread for now.
Alex Crichton [Sat, 16 Aug 2014 20:00:46 +0000 (13:00 -0700)]
Register new snapshots
Alex Crichton [Sat, 16 Aug 2014 18:20:47 +0000 (11:20 -0700)]
Add submodule test from #381
Alex Crichton [Wed, 6 Aug 2014 15:01:17 +0000 (08:01 -0700)]
Use libgit2 for driving git instead of the CLI
In general relying on external programs is dicey and tricky as they're very
different across systems in both how they're used as well as what versions
you'll find. Instead of binding to the least common denominator of CLI, we can
code against an exact version of libgit2.
This introduces a build-time dependency on cmake which libgit2 requires to build
itself, which is unfortunate, but thankfully it's only a build time dep. The
build process for libgit2 also automatically detects as many system libraries as
possible to use (if available), falling back to bundled versions if not
available. I have currently not figured how to control this, so the link-config
package is used to build libgit2 which requires that pkg-config be installed to
build cargo as well.
Closes #138
bors [Sat, 16 Aug 2014 19:44:14 +0000 (19:44 +0000)]
auto merge of #386 : alexcrichton/cargo/target-always-present, r=wycats
Alex Crichton [Sat, 16 Aug 2014 19:27:31 +0000 (12:27 -0700)]
Ensure TARGET is always present for build commands
bors [Sat, 16 Aug 2014 18:01:25 +0000 (18:01 +0000)]
auto merge of #372 : jauhien/cargo/master, r=alexcrichton
- splitn arguments order
- hasmap indexing
Closes #371
Alex Crichton [Sat, 16 Aug 2014 17:59:52 +0000 (10:59 -0700)]
static.rust-lang.org may be stale again?
Jauhien Piatlicki [Thu, 14 Aug 2014 18:07:05 +0000 (20:07 +0200)]
Fix code to be compilable with latest rustc:
- splitn arguments order
Closes #371
Alex Crichton [Fri, 15 Aug 2014 06:16:18 +0000 (23:16 -0700)]
Move back to static.rust-lang.org
The mac bots have been fixed
bors [Fri, 15 Aug 2014 04:28:57 +0000 (04:28 +0000)]
auto merge of #369 : alexcrichton/cargo/issue-327, r=wycats
The syntax was originally chosen to perhaps allow multiple libraries in the future, but that is less and less likely to happen at this point. This commit deprecates the now-misleading `[[lib]]` in favor of `[lib]` to indicate that only one can be present.
This does not start allowing `[bin]` or `[example]` and such as I felt that it was too many ways to specify what's essentially the same thing. This also as a bonus allows a top-level `bin = []` to completely opt-out of binary inference (as well as for tests and examples).
Closes #327
bors [Fri, 15 Aug 2014 04:07:00 +0000 (04:07 +0000)]
auto merge of #378 : wycats/cargo/fix-git-issues, r=alexcrichton
bors [Fri, 15 Aug 2014 04:00:13 +0000 (04:00 +0000)]
auto merge of #307 : erickt/cargo/bench, r=wycats
This adds initial support for benchmarking at `--opt-level=3` for cargo. It's run just like `cargo-test`, and can actually run tests at the higher optimization level with `cargo bench -- --test`.
One question I had though is if we should include the `-Zlto` for link time optimizations. I'm not sure how well supported that is. What do you all think?
bors [Fri, 15 Aug 2014 03:46:34 +0000 (03:46 +0000)]
auto merge of #366 : steveklabnik/cargo/get_to_subscript, r=alexcrichton
This fixes the build, which was broken due to the warnings.
Alex Crichton [Fri, 15 Aug 2014 03:36:53 +0000 (20:36 -0700)]
Mac builder DNS is still stale, use S3 urls
Yehuda Katz + Carl Lerche [Fri, 15 Aug 2014 00:05:01 +0000 (17:05 -0700)]
Fix issues related to git updates
We observed that after updating the git repo in a test, unless we waited
for 1s, we got intermittent cases where a subsequent update of the git
source would not pick up the changes.
We observed this both with the git CLI and the branch using libgit2.
There may be a better solution, but we did not find it.
Erick Tryzelaar [Thu, 14 Aug 2014 15:15:04 +0000 (08:15 -0700)]
replace "\n\n" with real newlines in test output
Erick Tryzelaar [Thu, 14 Aug 2014 15:14:34 +0000 (08:14 -0700)]
wip: Add `cargo-bench`, which runs benchmarks at --opt-level=3
Alex Crichton [Thu, 14 Aug 2014 06:08:02 +0000 (23:08 -0700)]
Deprecated [[lib]] in favor of [lib]
Alex Crichton [Thu, 14 Aug 2014 06:02:08 +0000 (23:02 -0700)]
Start accepting [lib], allow `bin = []`
This commit starts to accept `[lib]` as a single library per package. It also
allows opting-out of binaries/tests/examples with a top level `foo = []` rather
than taking an empty array to mean that inference should be enabled.
cc #327
Erick Tryzelaar [Thu, 14 Aug 2014 03:51:40 +0000 (20:51 -0700)]
replace .get() with .[]
Steve Klabnik [Tue, 12 Aug 2014 14:02:01 +0000 (10:02 -0400)]
.get() -> []
This fixes the build, which was broken due to the warnings.
bors [Tue, 12 Aug 2014 06:54:26 +0000 (06:54 +0000)]
auto merge of #365 : alexcrichton/cargo/new-snapshots, r=alexcrichton
Alex Crichton [Tue, 12 Aug 2014 05:04:43 +0000 (22:04 -0700)]
Register new snapshots
bors [Tue, 12 Aug 2014 04:31:21 +0000 (04:31 +0000)]
auto merge of #363 : alexcrichton/cargo/fix-some-bugs, r=wycats
This also pulls in #316 to land everything at the same time. The major fix is "Fix updating git sources when a new lockfile is committed", and everything else was just issues that had accumulated over time. Once this has landed (may take some finesse), I'll make a new snapshot so cargo can actually start properly updating itself.
Alex Crichton [Tue, 12 Aug 2014 04:22:29 +0000 (21:22 -0700)]
Fix the --list tests for windows
Alex Crichton [Tue, 12 Aug 2014 00:05:22 +0000 (17:05 -0700)]
Take a different strategy than ^{object}
Apparently that syntax only exists in more recent versions of git, not older
versions (like those present on the buildbots).
Alex Crichton [Mon, 11 Aug 2014 05:08:57 +0000 (22:08 -0700)]
Fix a flaky test (due to hashes changing)
Alex Crichton [Mon, 11 Aug 2014 05:07:15 +0000 (22:07 -0700)]
Merge commit 'xanxys/master' into fix-some-bugs
Alex Crichton [Mon, 11 Aug 2014 05:04:15 +0000 (22:04 -0700)]
Add a configure option to disable cross-tests
The tests are enabled by default and must be opted out of.
Closes #346
Alex Crichton [Mon, 11 Aug 2014 04:48:43 +0000 (21:48 -0700)]
Don't always print an error on test failures
Only print a failure if the command didn't have an exit status. Also, clarify
the failure message in the case that an exit was detected but it was not a
successful status.
Closes #350
Alex Crichton [Mon, 11 Aug 2014 04:36:29 +0000 (21:36 -0700)]
Don't pull in dev-deps for `cargo build`
Also don't pull them in for `cargo doc`, but continue to pull them in for
`cargo run` and `cargo test`.
Closes #351
Alex Crichton [Mon, 11 Aug 2014 04:27:17 +0000 (21:27 -0700)]
Disable doctests separately from tests
This adds a `doctest = false` option to the `Cargo.toml` config for a target to
disable doc tests for the target. Notably `test = false` does not disable this
as it is separately toggleable.
Closes #353
Alex Crichton [Mon, 11 Aug 2014 04:12:32 +0000 (21:12 -0700)]
Support --target with `cargo test`
Closes #356
Alex Crichton [Mon, 11 Aug 2014 04:01:59 +0000 (21:01 -0700)]
Fix `cargo clean` when not in the root dir
Closes #361
Alex Crichton [Sun, 10 Aug 2014 05:53:25 +0000 (22:53 -0700)]
Fix updating git sources a new lockfile is committed
This is the actual fix for #345
Alex Crichton [Sun, 10 Aug 2014 04:05:33 +0000 (21:05 -0700)]
Update rust-encoding
Closes #357
xanxys [Sat, 9 Aug 2014 05:37:50 +0000 (14:37 +0900)]
Add "--list" option to `cargo`, that shows lists of installed (sub)commands by searching
directories for executables with name cargo-*.
bors [Fri, 8 Aug 2014 05:03:07 +0000 (05:03 +0000)]
auto merge of #347 : alexcrichton/cargo/snapshots, r=new
Alex Crichton [Fri, 8 Aug 2014 04:59:27 +0000 (21:59 -0700)]
Register new snapshots
bors [Fri, 8 Aug 2014 03:54:44 +0000 (03:54 +0000)]
auto merge of #341 : alexcrichton/cargo/doc-test-tweaks, r=wycats
Alex Crichton [Thu, 7 Aug 2014 15:42:16 +0000 (08:42 -0700)]
Make sure version env vars are always present
They were accidentally left out of the `rustdoc --test` stage which caused
crates not to be able to be compiled.
Alex Crichton [Thu, 7 Aug 2014 15:27:05 +0000 (08:27 -0700)]
Verbosely say what's happening during doc tests
Or at least verbosely say when -v is provided.
Alex Crichton [Thu, 7 Aug 2014 15:26:38 +0000 (08:26 -0700)]
Fix --extern for doc tests for the local crate.
Closes #340
bors [Thu, 7 Aug 2014 02:03:01 +0000 (02:03 +0000)]
auto merge of #338 : alexcrichton/cargo/fix-dylib-tests, r=wycats
Alex Crichton [Thu, 7 Aug 2014 01:45:32 +0000 (18:45 -0700)]
Don't match the output of the submodule test
Apparently really old versions of git ignore --quiet and print things anyway,
causing the test to fail on the linux buildbot.
Alex Crichton [Thu, 7 Aug 2014 00:50:55 +0000 (17:50 -0700)]
Robustly run binaries and tests after compilation
These were previously just run by executing the raw binary, but this didn't
ensure that any of the necessary paths were in the dylib search path for the
host platform.
This commit enhances the return type of `compile_targets` to have information
about the result of compilation, along with the ability to spawn correctly
configured processes.
This primarily fixes `cargo test` and `cargo run` whenever dynamic dependencies
are involved, but it also fixes the two commands whenever there's a native
dynamic dependency involved as well.
bors [Thu, 7 Aug 2014 00:13:32 +0000 (00:13 +0000)]
auto merge of #336 : alexcrichton/cargo/no-more-location, r=wycats
Now that rust-url supports windows paths in URLs, this commit jettisons the
janky Location enum in favor of just using Url everywhere.
Alex Crichton [Wed, 6 Aug 2014 23:11:18 +0000 (16:11 -0700)]
Update rust-url with a contained bugfix
Alex Crichton [Wed, 6 Aug 2014 23:10:40 +0000 (16:10 -0700)]
Unconditionally write Cargo.lock
Otherwise `cargo-update` ends up not doing much because all sources are
considered equal regardless of their precision.
Alex Crichton [Wed, 6 Aug 2014 20:54:24 +0000 (13:54 -0700)]
Remove the update_remotes flag entirely
This will inadvertently fix #337 as no lockfile will imply that all dependencies
are not precise, and will hence be fetched.
Alex Crichton [Wed, 6 Aug 2014 16:21:10 +0000 (09:21 -0700)]
Remove Location, use Url everywhere
Now that rust-url supports windows paths in URLs, this commit jettisons the
janky Location enum in favor of just using Url everywhere.
bors [Wed, 6 Aug 2014 23:57:54 +0000 (23:57 +0000)]
auto merge of #302 : alexcrichton/cargo/doc-test, r=wycats
Whenever `cargo test` is run and a testable library target is available, the doc
tests will be run. This can be opted out of with `test = false` as usual.
This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to `extern crate foo`
explicitly.
Closes #334
bors [Wed, 6 Aug 2014 20:29:28 +0000 (20:29 +0000)]
auto merge of #330 : alexcrichton/cargo/fix-cargo-doc2, r=wycats
This erroneously used util::process instead of the custom process function in
the cargo_rustc module.
Alex Crichton [Wed, 6 Aug 2014 06:34:55 +0000 (23:34 -0700)]
Ensure env vars are set for cargo-doc
This erroneously used util::process instead of the custom process function in
the cargo_rustc module.
bors [Wed, 6 Aug 2014 19:34:04 +0000 (19:34 +0000)]
auto merge of #329 : alexcrichton/cargo/fix-git-submodule, r=wycats
The fast path bypassed updating the submodule which wasn't correct if we were
the first checkout.
bors [Wed, 6 Aug 2014 19:20:56 +0000 (19:20 +0000)]
auto merge of #328 : alexcrichton/cargo/cargo-building-cargo, r=wycats
Cargo should be able to build with cargo so others can depend on the cargo
library. This means that the one requirement of the CFG_VERSION env var will not
be available. This alters `version()` to prioritize CFG_VERSION but fall back to
the cargo-specified variables.
bors [Wed, 6 Aug 2014 19:10:27 +0000 (19:10 +0000)]
auto merge of #321 : alexcrichton/cargo/issue-304, r=wycats
The lockfile should only be checked in for bins, not libs.
Closes #304
bors [Wed, 6 Aug 2014 18:58:18 +0000 (18:58 +0000)]
auto merge of #320 : alexcrichton/cargo/fix-doc-bins, r=wycats
This removes the check in the compilation phase, but adds an error if you're
documenting a library and a binary with the same name (as the rustdoc output
would conflict).
Closes #318
bors [Wed, 6 Aug 2014 18:49:48 +0000 (18:49 +0000)]
auto merge of #319 : alexcrichton/cargo/fix-staticlibs, r=wycats
The file-naming bits weren't handling the staticlib case
Alex Crichton [Mon, 4 Aug 2014 14:00:17 +0000 (07:00 -0700)]
Fix the output type of `staticlib`
The file-naming bits weren't handling the staticlib case
Alex Crichton [Wed, 6 Aug 2014 05:26:38 +0000 (22:26 -0700)]
Fix submodules on the initial checkout
The fast path bypassed updating the submodule which wasn't correct if we were
the first checkout.
Alex Crichton [Wed, 6 Aug 2014 03:54:32 +0000 (20:54 -0700)]
Lift the requirement that cargo is built with make
Cargo should be able to build with cargo so others can depend on the cargo
library. This means that the one requirement of the CFG_VERSION env var will not
be available. This alters `version()` to prioritize CFG_VERSION but fall back to
the cargo-specified variables.
Alex Crichton [Fri, 1 Aug 2014 03:21:13 +0000 (20:21 -0700)]
Implement doc tests
Whenever `cargo test` is run and a testable library target is available, the doc
tests will be run. This can be opted out of with `test = false` as usual.
This is currently not super useful due to rust-lang/rust#16157, but I expect
that to be merged soon. In the meantime examples will need to `extern crate foo`
explicitly.
Alex Crichton [Fri, 1 Aug 2014 02:33:46 +0000 (19:33 -0700)]
Refactor cargo_test into an ops module
The logic for doc tests will get a little complex, so this is moved to aseparate
module instead of inside the executable.
bors [Tue, 5 Aug 2014 14:44:33 +0000 (14:44 +0000)]
auto merge of #325 : dotdash/cargo/git_no_template, r=alexcrichton
I customized my git repo template to default to the standard pre-commit
hook that checks for e.g. trailing whitespace and refuses to commit if
any trailing whitespace was found. This causes some of cargo's tests to
fail.
To be independent of the user's git template, create the repo for the
test without using any, by specifying an empty template.
Björn Steinbrink [Tue, 5 Aug 2014 10:24:17 +0000 (12:24 +0200)]
Fix running tests using git on systems with customized git templates
I customized my git repo template to default to the standard pre-commit
hook that checks for e.g. trailing whitespace and refuses to commit if
any trailing whitespace was found. This causes some of cargo's tests to
fail.
To be independent of the user's git template, create the repo for the
test without using any, by specifying an empty template.
bors [Mon, 4 Aug 2014 20:59:32 +0000 (20:59 +0000)]
auto merge of #323 : alexcrichton/cargo/issue-314, r=wycats
Closes #314
Alex Crichton [Mon, 4 Aug 2014 17:50:32 +0000 (10:50 -0700)]
Update the lockfile when deps are modified
Closes #314
bors [Mon, 4 Aug 2014 14:59:32 +0000 (14:59 +0000)]
auto merge of #317 : jdeseno/cargo/doc-manifest-path, r=alexcrichton
Alex Crichton [Mon, 4 Aug 2014 14:45:25 +0000 (07:45 -0700)]
Ignore Cargo.lock for libs in `cargo-new`
The lockfile should only be checked in for bins, not libs.
Closes #304
Alex Crichton [Mon, 4 Aug 2014 14:21:31 +0000 (07:21 -0700)]
Allow documenting binary targets.
This removes the check in the compilation phase, but adds an error if you're
documenting a library and a binary with the same name (as the rustdoc output
would conflict).
Joshua DeSeno [Mon, 4 Aug 2014 08:02:22 +0000 (17:02 +0900)]
Use same method to load manifest with doc sub-command
bors [Mon, 4 Aug 2014 04:34:57 +0000 (04:34 +0000)]
auto merge of #309 : alexcrichton/cargo/snapshots, r=wycats
These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
Alex Crichton [Sat, 2 Aug 2014 18:59:33 +0000 (11:59 -0700)]
Register new snapshots
These snapshots have the lockfile plus the per-target fingerprints. This also
additionally adds a lockfile to the repo for all our deps.
bors [Mon, 4 Aug 2014 03:25:05 +0000 (03:25 +0000)]
auto merge of #314 : alexcrichton/cargo/hurray-for-windows, r=wycats
On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
Alex Crichton [Mon, 4 Aug 2014 01:38:25 +0000 (18:38 -0700)]
Deal with different encodings of Cargo.lock
On windows, git will check out files with different line endings causing the
same serialized resolve to be resolved slightly differently. Instead of
comparing contents, this commit alters by testing whether the decoded resolve is
equivalent to the to-be-written resolve and only aborts writing if the two are
equal.
bors [Sun, 3 Aug 2014 17:07:06 +0000 (17:07 +0000)]
auto merge of #303 : alexcrichton/cargo/issue-299, r=wycats
Closes #299
bors [Sat, 2 Aug 2014 18:41:09 +0000 (18:41 +0000)]
auto merge of #308 : alexcrichton/cargo/enable-optimize, r=alexcrichton
Alex Crichton [Sat, 2 Aug 2014 18:39:39 +0000 (11:39 -0700)]
Fix distcheck with --enable-optimize
bors [Sat, 2 Aug 2014 17:56:11 +0000 (17:56 +0000)]
auto merge of #294 : alexcrichton/cargo/here-we-go, r=wycats
This is a series of commits which culminate in fixing #214. The last remaining bit is that freshness for an entire package is still considered if the package has a `build` command, but that is pretty easy to fix and I plan on doing so soon-ish.
Alex Crichton [Sat, 2 Aug 2014 07:08:31 +0000 (00:08 -0700)]
Make freshness tests more robust with time travel
Add a helper function to forcibly move a tree back one hour so new edits are
picked up correctly.
Alex Crichton [Sat, 2 Aug 2014 17:16:35 +0000 (10:16 -0700)]
Add a --enable-optimize flag to ./configure
Alex Crichton [Sat, 2 Aug 2014 06:31:11 +0000 (23:31 -0700)]
Don't tromp over too many files when downloading the snapshot
Alex Crichton [Tue, 29 Jul 2014 18:27:40 +0000 (11:27 -0700)]
Implement per-target fingerprints
This commit refines the granularity of fingerprints from packages to targets,
building on the existing infrastructure. All invocations of rustc now include
the --dep-info flag which will emit makefile-like dependency information. This
information is then parsed later on to determine if all the files are fresh.
The purpose of this commit is to refine the set of files which indicate that a
target needs to be re-built. Before this commit if you modified a test it would
rebuild the entire library, but after this commit it only rebuilds the relevant
test.
Closes #214
Closes #289
Alex Crichton [Tue, 29 Jul 2014 17:20:42 +0000 (10:20 -0700)]
Prepare for per-target fingerprints
This commit refactors all related infrastructure for the cargo_rustc module to
move the granularity of fingerprints from packages to targets. This involved
heavily modifying the `JobQueue` structure to understand a finer-grained target
for dirtiness propagation and dependency management, and then dealing with
fallout in the main module.
The fingerprint module has been refactored to support a per-target fingerprint.
A fallout of this change is that each build step has its own fingerprint,
including the custom build command step. This will be implemented in a future
commit.
As fallout of this reorganization, we are now exploiting the maximal parallelism
within packages themselves whereas before we were only partially parallelizing.
No new features were added as part of this commit, so I just ensured that all
the tests ran.
Alex Crichton [Tue, 29 Jul 2014 04:23:48 +0000 (21:23 -0700)]
Power the TaskPool with a sync channel
This rate limits the jobs entering the pool to ensure that the number of
pending jobs is actually close to the number of cores. The current behavior is
to print all pending jobs, even when they're not executing, which may be
confusing.
Alex Crichton [Tue, 29 Jul 2014 04:13:30 +0000 (21:13 -0700)]
Make the dependency queue entirely generic
This paves the way for future intra-package parallelism as opposed to just
inter-package parallelism.
Steve Klabnik [Sat, 2 Aug 2014 01:56:12 +0000 (21:56 -0400)]
Fix the build.
After an upstream fix in docopt, cargo now builds on rust HEAD. Also,
move to the semver crate rather than the deprecated built-in one.